package com.huxiu.net.model;

import com.google.gson.Gson;

import org.w3c.dom.Comment;

/**
 * Created by tian on 15/4/17:下午6:20.
 */
public class SpareItem extends BasicItem {
    public int id;//晒物列表页评论的id
    public int sid;//                “sid”: (int)”短文唯一id”
    public int follow_status; //                “follow_status”：“用户关注状态”， 1是关注 0 是未关注
    public String pic;//                “pic“ ： 图片地址，
    public String name;    //                “name”:”用户名”,
    public long create_time;    //                “crete_time” ： 创建时间
    public String title;    //                “title”：“标题”，
    public String user_id;// “user_id”: (int)”已报名用户id”,
    public String avatar;    //                “avatar”:”头像图片url”,
    public int like_status;    //                “like_status”：“文章喜欢状态”， 1是点赞 0 是取消
    public int like_num;    //                “like_num”:喜欢数量，
    public String price;    //                “price”:”价格”,
    public int comment_num;    //                “comment_num”:“评论数”,
    public String description;
    public String content;
    public String city_name;
    public Comment[] comment;
    public String user_goods_id;
    public String[] images;
    public String share_url;
    public String share_pic;
    public String buy_channel;//购买渠道
    public String mobile;
    public String contact_name;

    public boolean liked() {
        return like_status == 1;
    }

    public boolean followed() {
        return follow_status == 1;
    }


    public String toString() {
        return new Gson().toJson(this);
    }
}
